home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1989 February
/
Ahoy_Magazine_89-02_1989_Double_L.d64
/
Undivided Primes
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
353b
|
10 lines
0 print"[147]"tab(12)"undivided primes"
1 rem ==================================
2 rem commodares problem #58-1 :
3 rem undivided primes
4 rem solution by
5 rem paul cortez
6 rem ==================================
10 dimx%(15000):fori=3to30001step2:z=z+1:ifx%(z-1)=0thenprinti-2:ifi=3thenprint2
20 q=q+1+a+a+a:a=aor(i>4997):t=q:forj=15000toi+istep-i:t=t+i:x%(t)=1:nextj,i